package process_demo.attributes.state.demo1;

import process_demo.stack.demo1.MyThread;

/**
 * @author haomin
 * @date 2022/04/19 19:58
 **/
public class Main1 {
    public static void main(String[] args) {
        Thread thread = Thread.currentThread();
        // 得到状态
        System.out.println(thread.getState());
        // 得到优先级
        System.out.println(thread.getPriority());
        // 修该优先级
        thread.setPriority(Thread.MAX_PRIORITY);
        System.out.println(thread.getPriority());
        // 得到前台 后台线程
        Thread thread1 =new MyThread();
        System.out.println(thread1.isDaemon());
        thread.setDaemon(true);
//        System.out.println(thread1.isDaemon());
    }
}